import http from "@/untils/request";

interface ResType<T> {
    code: number
    data: T
    message: string
}

interface ListItem {
    companyName: string
    id: number
}

interface ListRes {
    list: ListItem[]
    page: number
    total: number
}

export const getCompanyList = () => {
    http<ResType<ListRes>>({
        url: "/company/list",
        method: "get"
    })
}
export const getRouterList = () => {
    return http<ResType<any>>({
        url: "/getRouters",
        method: "get"
    })
}
interface PhParams {
    year: string;
    startDate: string;
    endDate: string;
    caseCategory: number;
}
export const getPhList = (params: PhParams) => {
    return http<ResType<any>>({
        url: "/weiquan/index/townRanking",
        method: "get",
        params
    })
}
interface HzParams {
    year: string
    status: number
    caseCategory: number
}
export const getHz = (params: HzParams) => {
    return http<ResType<any>>({
        url: "/weiquan/index/caseTotal",
        method: "get",
        params
    })
}
